
function url(pathname) {
  return window.RPConfig['local'] + pathname;
}


export const dataQualityAPI = {
   /** 获取bu下拉框 */
  getBuList: params => {
    return $http.get(url('/monthStatistic/bu-list'), params).then(res => res.data);
  },

  /** 获取年份下拉框 */
  getYearAndMonth: (params) => {
    return $http.get(url('/comboBox/yearAndMonth'),params).then(res => res.data);
  },

  /** 获取bu下拉框 */
  getBu: (params) => {
    return $http.get(url('/comboBox/ownedBU'),params).then(res => res.data);
  },
  /** 月报-业务单元排行榜 **/
  buRankReport: params => {
    return $http.get(url("/monthStatistic/buRankReport"), params).then(res => res.data);
  },

  /** 报送数据量核比 **/
  getDataReport: params => {
    return $http.get(url("/monthStatistic/dataReport"), params).then(res => res.data);
  },

  /** 月报-非结构化附件报送率 **/
  getUnstructuredReport: params => {
    return $http.get(url("/monthStatistic/unstructuredReport"), params).then(res => res.data);
  },

  /** 月报-履约及支付滚动报送率 **/
  getPerfAndPayReport: params => {
    return $http.get(url("/monthStatistic/perfAndPayReport"), params).then(res => res.data);
  },

  /** 月报-报送表单结构完整率 **/
  tbReport: params => {
    return $http.get(url("/monthStatistic/tbReport"), params).then(res => res.data);
  },
  /** 月报-框架协议报送明细 **/
  frameworkAgrReport: params => {
    return $http.get(url("/monthStatistic/frameworkAgrReport"), params).then(res => res.data);
  },

  /** 月报-非结构化数据内容质量问题分布-表1-招标文件质量问题清单 **/
  bidFileCountReport: params => {
    return $http.get(url("/monthStatistic/bidFileCountReport"), params).then(res => res.data);
  },

  /** 月报-非结构化数据内容质量问题分布-表3-分项报价表质量问题清单 **/
  quotationCountReport: params => {
    return $http.get(url("/monthStatistic/quotationCountReport"), params).then(res => res.data);
  },

  /** 月报-结构化字段填报质量问题分布 **/
  fieldFillingQualityReport: params => {
    return $http.get(url("/monthStatistic/fieldFillingQualityReport"), params).then(res => res.data);
  },

  
  /** 月报-报送数据量核比（未上报、已上报） 导出 **/
  dataReportExport: params => {
    return $http.get(url("/monthStatistic/dataReport/export"), params, null, { responseType: "blob", timeout: 480000 });
  },

  /** 月报-非结构化附件报送率导出 **/
  unstructuredReportExport: params => {
    return $http.get(url("/monthStatistic/unstructuredReport/export"), params, null, { responseType: "blob", timeout: 480000 });
  },

  /** 月报-履约及支付滚动报送率导出 **/
  perfAndPayReportExport: params => {
    return $http.get(url("/monthStatistic/perfAndPayReport/export"), params, null, { responseType: "blob", timeout: 480000 });
  },

   /** 月报-报送表单结构完整率导出 **/
  tbReportExport: params => {
    return $http.get(url("/monthStatistic/tbReport/export"), params, null, { responseType: "blob", timeout: 480000 });
  },

   /** 月报-框架协议报送明细导出 **/
  frameworkAgrReportExport: params => {
    return $http.get(url("/monthStatistic/frameworkAgrReport/export"), params, null, { responseType: "blob", timeout: 480000 });
  },


};
